import { EntitySchema } from '@mikro-orm/core';

export class ImsYzdKpDistributeWallet {
  id!: number;
  disId!: number;
  ktxMoney?: string;
  ytxMoney?: string;
  bktxMoney?: string;
  txzMoney?: string;
  uniacid!: number;
}

export const ImsYzdKpDistributeWalletSchema = new EntitySchema({
  class: ImsYzdKpDistributeWallet,
  properties: {
    id: { primary: true, type: 'number' },
    disId: { type: 'number', index: 'dis_id' },
    ktxMoney: {
      type: 'string',
      columnType: 'numeric(10,2)',
      nullable: true,
      defaultRaw: `0.00`,
    },
    ytxMoney: {
      type: 'string',
      columnType: 'numeric(10,2)',
      nullable: true,
      defaultRaw: `0.00`,
    },
    bktxMoney: {
      type: 'string',
      columnType: 'numeric(10,2)',
      nullable: true,
      defaultRaw: `0.00`,
    },
    txzMoney: {
      type: 'string',
      columnType: 'numeric(10,2)',
      nullable: true,
      defaultRaw: `0.00`,
    },
    uniacid: { type: 'number', index: 'uniacid' },
  },
});
